1. Field of the Invention
The present invention relates to automated methods for determining whether Internet browsers support particular hardware-independent page description languages. More particularly, the present invention relates to a method for detecting whether a client Internet browser is capable of displaying scalable vector graphics.
2. Discussion of the Related Art
The World Wide Web (the xe2x80x9cwebxe2x80x9d) is part of the Internet that organizes information contained in documents using hyper media. Each Web document, or xe2x80x9cweb pagexe2x80x9d can contain information in the form of text or embedded references to images, audio and video clips, or other documents via hyperlinks. A web user accesses Internet sites having web pages (xe2x80x9cweb sitesxe2x80x9d) through various computer applications called web browsers and navigates through the information provided by the web pages. In an effort to make web pages uniformly readable by all types of browsers, the web has evolved such that web pages are typically specified in terms of content and format by one of several hardware and browser independent page description languages that are well known in the art, including, but not limited to, markup languages such as HTML, SHML, XML and XSL, and scripting languages such as JavaScript. As page description languages, graphical formats, and other languages, technologies and formats related to the web page art evolve, however, the situation often arises wherein a relatively new language or technology (or newer version of such a language/technology) is not supported by one or more commercially popular web browsers. Thus, web site developers are faced with browser compatibility problems when they attempt to incorporate newer useful technologies into their web sites; often, they simply cannot incorporate the new technology into their site without alienating a significant amount of web traffic.
A technique currently employed by web developers to address this problem comprises creating two essentially identical versions of the same web page. The first web page version is written using the new technology, and the second web page is essentially a copy of the first web page but the second web page version is written using only older and more widely universal technologies. The web developer then creates two hyperlinks on a predecessor page, one for connecting a user""s browser to the first web page version and the other for connecting it to the second web page version. The web user is thereby instructed to manually select one of the two hyperlinks on the predecessor page depending upon whether his or her browser can or cannot support the newer technology.
This technique has several inherent drawbacks. First, due to, among other things, the fact that a large portion of web users lack technical savvy, or the practice of Internet service providers placing custom xe2x80x9cskinsxe2x80x9d on commercially available browsers to change their graphical appearances, or both, web users are often not aware of what type of version of browser they are using. Thus, they cannot easily and accurately decide which hyperlink to choose. Additionally, even if a given web user knows which hyperlink to select, the user is still burdened with the task of having to manually select the proper hyperlink. As such, this solution remains inelegant and thus undesirable.
Scalable vector graphics (xe2x80x9cSVGxe2x80x9d) is a relatively new vector graphics language whose code is designed to be incorporated directly into the code of web pages written in XML or HTML. Because of SVG""s ability to be coded directly within XML or HTML web pages, it provides several useful features including: easily defined links to parts of an image, resolution independence wherein the SVG image can automatically be scaled up or down to fit into any size display, searchable text for SVG images, and animation support.
Currently, not all web browsers support SVG. Therefore, web developers cannot simply add SVG content to their web sites and expect every visitor to the web site to be able to view that content. However, the SVG language is a candidate recommendation of the World Wide Web Consortium (xe2x80x9cW3Cxe2x80x9d), and SVG is rapidly gaining popularity within the web developing community.
While web developers can currently incorporate SVG into their websites without alienating certain users by using the manual hyperlinking technique, this approach still inherently suffers from the drawbacks outlined above. Therefore, there remains a need in the art for a manner in which one could easily detect whether a client browser supports SVG output such that SVG information could be automatically transmitted or omitted depending upon whether a particular user""s browser supports SVG.
Accordingly, the present invention is an improvement over prior art methods for displaying pages containing SVG content that enables the automatic detection of whether a particular browser supports SVG.
In light of the above and other drawbacks inherent in the prior art, it is an object of the present invention to provide a method for automatically detecting whether a web page request has originated from a browser that supports SVG.
Further, it is an object of the present invention to provide a method for automatically determining whether a web browser has an available plug-in that supports SVG.
Additional objects, features and advantages of the invention will be set forth in the description that follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the exemplary embodiments particularly pointed out in the written description and claims hereof as well as in the appended drawings.
To achieve these and other advantages and in accordance with the purpose of the present invention, as embodied and broadly described, the method for automatically determining whether a browser supports SVG includes the steps of receiving a request from the browser for a particular web page that is available in either with or without SVG content. In response to the request, JavaScript is used to request a list of supported Multipurpose Internet Mail Extensions (xe2x80x9cMIMExe2x80x9d) types from the browser. If the browser returns a list of the requested MIME types, the returned list is scanned to detect SVG support. If scanning of the MIME types detects that SVG support is present, the requested web page is sent containing SVG content. If no SVG support is detected in the returned MIME types, the web page is sent to the browser without SVG content.
In the event that the browser does not return a list of MIME types in response to the JavaScript request, the method further comprises using Visual Basic Scripting Edition language (or xe2x80x9cVBScriptxe2x80x9d) to attempt to have the browser create an SVG object on the client device. If the object is created successfully, then SVG support has been detected and the browser is served the web page with SVG content. If an error is returned in response to the attempt to create an SVG object, then SVG support is not present and the browser is served the web page without SVG content.
In alternative embodiments of the present invention, the method includes using JavaScript to request from the browser a list of its available plug-ins, and scanning a returned plug-in list to determine whether SVG is supported. If an SVG support plug-in is not detected in the returned list, VBScript is used as described above to instruct the browser to attempt to create an SVG object on the client device and to detect SVG support in that manner.
In preferred embodiments, the invention can be incorporated into web page design and serving protocols such that web users would not have to manually select that their browser supports SVG in order to view SVG content. The invention thereby greatly simplifies the task of web surfing and gives web developers increased flexibility in incorporating SVG content into their web sites.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are intended to provide further explanation of the invention as claimed.